<?php namespace app\admin\validate;
use think\Validate;
//用户表验证表验证
class Users extends Validate{
	protected $rule =   [
        'username'  => 'require',
        'password'   => 'require', 
        'comfirmpassword'   => 'require',
        'comfirmpassword'=>'confirm:password',
        'phone'   => 'require|number',
//       'phone' =>'regex:^13[\d]{9}$\|^14[5,7]{1}\d{8}$\|^15[^4]{1}\d{8}$\|^17[0,6,7,8]{1}\d{8}$\|^18[\d]{9}$',

        'email'   => 'require|email',
        'status'  =>'require',
    ];
    
    protected $message  =   [
        'username.require' => '请输入管理员名称！',
        'password.require' => '请输入初始密码！',
        'comfirmpassword.require' => '请输入确认密码！',
        'comfirmpassword.confirm' => '两次输入的密码不一致！',
        'phone.require' => '请输入手机号码！',
        'phone.number' => '手机号码必须为11数字！',
        'phone.regex' => '你输入的手机号码不正确！',  
        'email.require' => '请输入邮箱！', 
        'email.email' => '输入的邮箱格式不正确！', 
        'status.require' => '请选择状态！', 
    ];
	
	
}
